package com.hl.springboot4.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

/**
 * @ClassName Student
 * @Description TODO
 * @Author libowen
 * @Date 2025年03月06日 14:09
 * @Version 1.0
 */
@Data
@ApiModel
public class Student {
    @ApiModelProperty(value = "编号",required = true)
    private int id;
    @NotBlank
    @Size(min = 2, max = 10)
    @ApiModelProperty(value = "姓名",required = true)
    private String name;
    @Min(0)
    @Max(18)
    @ApiModelProperty(value = "年龄",required = true)
    private int age;
    @Pattern(regexp = "^1[3-9]\\d{9}$")
    private String tel;
    @Email
    private String email;
}
